<?php
/**
 * Created by PhpStorm.
 * User: LiuJiaJun
 * Date: 2018/12/11
 * Time: 17:11
 */

namespace api\storage\controller;


use api\storage\service\SocketService;
use cmf\controller\RestBaseController;

class SocketController extends RestBaseController
{

    public function test()
    {
        set_time_limit(0);
        $host = '0274';
        $i = 0;
        while ($i <= 25) {
            $i++;
            $mod = $i % 7;
            if ($mod == 6) {
                sleep(5);
                continue;
            }
            SocketService::test($host, $mod);
            sleep(5);
        }
    }
    public function testOnce(){
        SocketService::test('0274',5);
    }
}